package lock;

/**
 * @author ：黄淼淳
 * @description：可重入锁
 * @date ：2021/12/11 19:53
 */
public class Test1 {
    public static void main(String[] args) {
        Resource resource = new Resource();
        for (int i = 0; i < 100; i++) {
            new Thread(()->{
                while (true) {
                    resource.sale();
                }
            },"王五"+i).start();
        }
    }
}
